﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ProjuctDetail.aspx.cs" Inherits="FashionMural.Web.Projuct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:PlaceHolder runat="server" ID="imgdetailph" Visible="false">
        <script type="text/javascript" src="/Scripts/jcarousellite.js"></script>
        <div class="position">首页 > 产品中心 > <%=CurrentPage.PageName %></div>
        <div class="chanpinzx">
            <h1>产品中心</h1>
            <%if (this.CurrentImage != null)
              {
            %>
            <!--添加的内容图片的切换-->
            <div class="fenye">
                <ul>
                    <li><a <%=PreId==0?"":"href=\""+string.Format(NaUrl,PreId) +"\""%>>上一页　PREV</a></li>
                    <li><a <%=NextId==0?"":"href=\""+string.Format(NaUrl,NextId)+"\"" %>>下一页　NEXT</a></li>
                    <ul>
            </div>
            <div class="pic_zs">
                <img alt="" style="width: 550px; height: 400px;" src="<%=CurrentImage.Path %>" />
            </div>
            <div class="pic_little">
                <img id="iprev" alt="" src="images/prev.jpg" style="cursor: pointer" onclick="ImageScroll(-1);" />
                <div id="pimgsjCarousel" style="display:inline-block">
                    <ul>
                        <%foreach (var img in Images)
                          {
                        %>
                       <li> 
                            <img onclick='window.location="<%=string.Format(NaUrl,img.Id) %>";'  alt="" style="width:120px;height:90px;margin-right:15px;cursor:pointer;" class="<%=img.Id==CurrentImage.Id?"cur_pic":"" %>" src="<%=img.Path %>" /></li>
                        <%
                      } %>
                    </ul>
                </div>
                <img id="inext" alt="" src="images/next.jpg" style="cursor: pointer" onclick="ImageScroll(1);" />
            </div>
            <div class="jieshao">
                <span><%=CurrentImage.Describe %></span>
                <a href="/Products.aspx?t=<%=FatherPageId%>"></a>
            </div>
            <%
              } %>
        </div>
        <div class="cplist">
                <h2>产品中心</h2>
                <%if (ChildPages != null)
                  {
                      foreach (var p in ChildPages)
                      {
                %>
                <p><a href="Products.aspx?t=<%=p.Id %>"><%=p.PageName %></a> </p>
                <%
                      }
                  } %>

                <h3>最新资讯</h3>
                <ul>
                    <%if (News != null)
                      {

                          foreach (var n in News)
                          {
                    %>
                    <li><a href="/NewDetail.aspx?t=<%=n.Id %>"><%=n.Title %></a></li>
                    <%
                          }
                      } %>
                </ul>

            </div>
        <script type="text/javascript">
            $(document).ready(function () {
                var i = '<%=CurrentIndex%>';
               var totallength= $("#pimgsjCarousel ul li").length;
               if (i > totallength - 3)
               {
                   i = totallength - 3;
               }
               if (i < 0) {
                   i = 0;
               }

                $("#pimgsjCarousel").jCarouselLite({
                    btnPrev: "#iprev",   //上一张按钮
                    btnNext: "#inext",   //下一张按钮          //从第几个开始滚动显示
                    scroll: 1,
                    visible: 4,
                    vertical: false,
                    circular: false,
                    start:i,
                });
            });
            function ImageScroll(number) {
                var width = $("imgscrolldiv").css("width");
                var marginnow = $("imgscrolldiv").css("left");
                var margintarget = marginnow + 135 * number;
                if (margintarget >= width * -1 && marginleft <= 0) {
                    var marginleft = margintarget + "px";
                    $("imgscrolldiv").animate({ "margin-left": marginleft }, 100);
                }
            }

        </script>
    </asp:PlaceHolder>

    <asp:PlaceHolder runat="server" ID="linkdetailph" Visible="false">
        <%=HtmlText %>
        <div><a href="/Products.aspx?t=" <%=FatherPageId%>>返回产品列表页</a></div>
    </asp:PlaceHolder>


</asp:Content>
